<?php
namespace app\common\model;

use think\Db;
use think\Model;

class Collection extends Model
{

    /**
     * 添加
     */
    public function addCollection($data){
        $res = $this->save($data);
        if($res){
            $return = ['code'=>1,'msg'=>'收藏成功'];
        }else{
            $return = ['code'=>0 ,'msg' => '收藏失败'];
        }
        return $return;
    }
}